home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / quicktime / effects / samplemakeeffectmovie / makeeffectmovie.h < prev    next >
Encoding:
Text File  |  2000-09-28  |  2.0 KB  |  78 lines

  1. //////////
  2. //
  3. //    File:        MakeEffectMovie.h
  4. //
  5. //    Contains:    QuickTime video effect support for QuickTime movies.
  6. //                This file is used for BOTH MacOS and Windows.
  7. //
  8. //    Written by:    Tim Monroe
  9. //                Based (heavily!) on the previous MakeEffectMovie code written by Sam Bushell.
  10. //
  11. //    Copyright:    © 1997-1998 by Apple Computer, Inc., all rights reserved.
  12. //
  13. //    Change History (most recent first):
  14. //
  15. //       <1>         11/06/97    rtm        first file; integrated existing code with shell framework
  16. //       
  17. //////////
  18.  
  19. //////////
  20. //
  21. // header files
  22. //
  23. //////////
  24.  
  25. #include <ImageCodec.h>
  26.  
  27. #if TARGET_OS_MAC
  28. #include "MacFramework.h"
  29. #endif
  30.  
  31. #if TARGET_OS_WIN32
  32. #include "WinFramework.h"
  33. #endif
  34.  
  35.  
  36. //////////
  37. //
  38. // compiler flags and macros
  39. //
  40. //////////
  41.  
  42. #define USES_MAKE_IMAGE_DESC_FOR_EFFECT    1        // use MakeImageDescriptionForEffect (QT 4.0 and later)
  43.  
  44. #define    BailNil(n)                        if (!n) { if (!myErr) myErr = -1; goto bail; }
  45. #define    BailError(n)                    if (n) { if (!myErr) myErr = -1; goto bail; }
  46.  
  47.  
  48. //////////
  49. //
  50. // constants
  51. //
  52. //////////
  53.  
  54. #define kMaxNumSources                    2        // the maximum number of input tracks we will collect
  55.  
  56. #define kNoSourceName                    FOUR_CHAR_CODE('none')
  57. #define kSourceOneName                    FOUR_CHAR_CODE('srcA')
  58. #define kSourceTwoName                    FOUR_CHAR_CODE('srcB')
  59.  
  60. #define kDefaultFramesPerSecond            15        // the default playback rate of the video effects track
  61.  
  62.  
  63. //////////
  64. //
  65. // function prototypes
  66. //
  67. //////////
  68.  
  69. OSErr                                QTEffects_GetFirstVideoTrackInMovie (Movie theMovie, Track *theTrack);
  70. OSErr                                QTEffects_DisplayDialogForSources (FSSpec *theSpecList, UInt16 theSpecCount);
  71. void                                QTEffects_RespondToDialogSelection (OSErr theErr);
  72. # if TARGET_OS_WIN32
  73. static void                            QTEffects_EffectsDialogCallback (EventRecord *theEvent, DialogRef theDialog, DialogItemIndex theItemHit);
  74. LRESULT CALLBACK                    QTEffects_CustomDialogWndProc (HWND theWnd, UINT theMessage, UINT wParam, LONG lParam);
  75. #endif
  76. Boolean                                QTEffects_HandleEffectsDialogEvents (EventRecord *theEvent, DialogItemIndex theItemHit);
  77. void                                QTEffects_PromptUserForFilesAndMakeEffect (void);
  78.